package model.requirement4;

// 橄榄装饰器
public class OliveDecorator extends PizzaDecorator {
    public OliveDecorator(CustomPizza pizza) {
        super(pizza);
    }

    @Override
    public String getDescription() {
        return pizza.getDescription() + ", 橄榄";
    }

    @Override
    public double getCost() {
        return pizza.getCost() + 1.20; // 橄榄的额外价格
    }
}
